package com.lxf.cloudotherserve.mapper;

import com.lxf.cloudotherserve.bean.UserCommentBean;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
import org.springframework.stereotype.Component;

/**
 * @author 罗兴发
 * @data 2025/6/23 11:54
 * @description：es持久层
 */
@Component
public interface UserCommentItemRepository extends ElasticsearchRepository<UserCommentBean, String> {
    /**
     * 根据内容ID和类型查询浏览记录
     * @param type 类型
     * @param objId 内容ID
     * @param pageable 分页对象
     * @return 返回分页结果集
     */
    Page<UserCommentBean> findAllByObjIdAndObjType(Integer type,String objId, Pageable pageable);
}